﻿<%@ Page Language="C#" MasterPageFile="~/FrameMasterPage.master" AutoEventWireup="true" CodeFile="EquipmentTypeDetail.aspx.cs" Inherits="EquipmentTypeDetail" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="m_contentBody" Runat="Server">

<body>

   <table cellspacing="2" cellpadding ="2" style="height:100%" class="GridItem" >
        <br />
        <tr >
            <td colspan="2"><strong> Equipment type detail </strong> </td>  </br></br>
            
        </tr>
      <tr>
         <td style="height: 28px"><asp:Label ID="Label1" runat="server" Text="EquipmentTypeId:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblEquipmentTypeId" runat="server" ></asp:Label>
             <asp:TextBox ID="txtHiddenTypeId" runat="server" Visible="False"></asp:TextBox>
          </td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label6" runat="server" Text="EquipmentType:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblEquipmentType" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label7" runat="server" Text="System:  "></asp:Label></td>    
         <td>
         <asp:GridView ID="grdSystem" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" 
                    CssClass="GridItem" DataKeyNames="SystemId" DataSourceID="dsSystem" 
                    OnPageIndexChanging="grdEquipment_PageIndexChanging" 
                    onrowcancelingedit="grdEquipment_RowCancelingEdit" 
                    onrowcommand="grdSystem_RowCommand" onrowdatabound="grdEquipment_RowDataBound1" 
                    onrowdeleting="grdSystem_RowDeleting" onrowediting="grdSystem_RowEditing" 
                    onrowupdated="grdSystem_RowUpdated" onrowupdating="grdSystem_RowUpdating" 
                    onselectedindexchanged="grdEquipment_SelectedIndexChanged" 
                    onsorted="grdSystem_Sorted" PageSize="15" RowHeaderColumn="EquipmentId" 
                    Width="96%">
                    <SelectedRowStyle BackColor="Yellow" />
                    <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="30px" />
                    <Columns>
                    
                        
                        
                        <asp:CommandField DeleteText="" InsertText="" ShowEditButton="True" 
                            ShowSelectButton="True">
                            <ItemStyle Width="40px" />
                        </asp:CommandField>
                       
                       
                        
                        <asp:ButtonField CommandName="Delete" Text="Delete">
                            <ItemStyle Width="20px" />
                        </asp:ButtonField>
                        <asp:BoundField DataField="SystemId" HeaderText="Nº" ReadOnly="True">
                            <ItemStyle Width="50px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="System">
                            <ItemTemplate>
                                <%# Eval("System") %>
                            </ItemTemplate>
                            <EditItemTemplate>
                                &nbsp;<asp:TextBox ID="textBox0" runat="server" Text='<%# Bind("System") %>' 
                                     Width="95%"></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <EditRowStyle BackColor="LightGray" />
                    <RowStyle CssClass="AlternativeRowStyle" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
                </asp:GridView>
                 <asp:ObjectDataSource ID="dsSystem" runat="server" 
                          SelectMethod="GetEquipmentTypeBySystem"  
                    TypeName="DirectService" 
                 UpdateMethod="UpdateSystem" >
                     <UpdateParameters>
                         <asp:Parameter Name="systemId" Type="Int32" />
                         <asp:Parameter Name="system" Type="String" />
                     </UpdateParameters>
                     <SelectParameters>
                         <asp:ControlParameter ControlID="lblEquipmentTypeId" Name="equipementTypeId" 
                             PropertyName="Text" Type="String" />
                     </SelectParameters>
                                      
              </asp:ObjectDataSource>
         
       
         </td>  
     
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label2" runat="server" Text="Is Sparepart:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblSparepart" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label3" runat="server" Text="Is BuiltIn:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblBuiltIn" runat="server" ></asp:Label></td>    
      </tr>
      
          
  </table>

</body>

</asp:Content>



